// @ts-ignore
/* eslint-disable */
import request from '@/request'

/** 根据比赛id查询比赛信息 GET /api/race/detail/${param0} */
export async function listUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.listUsingGETParams,
  options?: { [key: string]: any }
) {
  const { RaceId: param0, ...queryParams } = params
  return request<API.RbisaixinxiVO>(`/api/race/detail/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  })
}

/** 根据比赛id查询详细信息 GET /api/race/getRaceInfoByRace */
export async function getRaceInfoByRaceUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getRaceInfoByRaceUsingGETParams,
  options?: { [key: string]: any }
) {
  return request<API.Rbisaixinxiduixiang>('/api/race/getRaceInfoByRace', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/** 根据活动id查询该活动已有多少人参加 POST /api/race/getUserJoinCount */
export async function getUserJoinCountUsingPost(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getUserJoinCountUsingPOSTParams,
  options?: { [key: string]: any }
) {
  return request<API.Rint>('/api/race/getUserJoinCount', {
    method: 'POST',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/** 查询用户参加的所有比赛 GET /api/race/getUserRaceList */
export async function getUserRaceListUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getUserRaceListUsingGETParams,
  options?: { [key: string]: any }
) {
  return request<API.RListbisaixinxiduixiang>('/api/race/getUserRaceList', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/** 带条件分页查询比赛列表 GET /api/race/raceList */
export async function listUsingGet2(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.listUsingGET2Params,
  options?: { [key: string]: any }
) {
  return request<API.MyPageVoListbisaixinxiVO>('/api/race/raceList', {
    method: 'GET',
    params: {
      ...params,
      params: undefined,
      ...params['params'],
      'rewardList[0].params': undefined,
      ...params['rewardList[0].params'],
    },
    ...(options || {}),
  })
}

/** 查询比赛类型列表 GET /api/race/typeList */
export async function listUsingGet1(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.listUsingGET1Params,
  options?: { [key: string]: any }
) {
  return request<API.RListbisaileixingduixiang>('/api/race/typeList', {
    method: 'GET',
    params: {
      ...params,
      params: undefined,
      ...params['params'],
    },
    ...(options || {}),
  })
}
